package org.opens.db.constant;

public enum DbType {

    MYSQL("mysql"),
    ORACLE("oracle"),
    SQL_SERVER("sqlserver"),
    KING_BASE8("kingbase8"),
    EMPTY("空实现");

    private String typeName;

    DbType(String typeName) {
        this.typeName = typeName;
    }

    public String getTypeName() {
        return typeName;
    }

    public static DbType getInstance(String typeName) {
        for (DbType value : DbType.values()) {
            if (value.getTypeName().equals(typeName)) {
                return value;
            }
        }
        return null;
    }

}
